package com.four.basicinfo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.four.basicinfo.entity.Abroad;
import com.four.basicinfo.entity.Document;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AbroadDao extends BaseMapper<Abroad> {
    /**
     * 查询出国
     *
     * @param id 出国主键
     * @return 出国
     */
    public Abroad selectAbroadById(Long id);
    //查询个人
    @Select("select id,number,name,relationship,identity,country," +
            "work_city as workCity, work,duties,starting_time as startingTime,end_time as endTime,notes from abroad where number=#{number}")
    public List<Abroad> selectByNum(Integer number);
    /**
     * 新增出国
     *
     * @param abroad 出国
     * @return 结果
     */
    public int insertAbroad(Abroad abroad);

    /**
     * 修改出国
     *
     * @param abroad 出国
     * @return 结果
     */
    public int updateAbroad(Abroad abroad);

    /**
     * 删除出国
     *
     * @param id 出国主键
     * @return 结果
     */
    public int deleteAbroadById(Long id);
}
